package com.yunliuchain.examination;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import java.net.UnknownHostException;



@EnableSwagger2
@EnableTransactionManagement
@ComponentScan({"com.yunliuchain.examination"})
@EnableAutoConfiguration
@MapperScan(basePackages = "com.yunliuchain.examination.*.dao", sqlSessionFactoryRef = "sqlSessionFactory")
@SpringBootApplication
@EnableScheduling
public class ExaminationApplication {


    /**
     * Main method, used to run the application.
     *
     * @param args the command line arguments
     * @throws UnknownHostException if the local host name could not be resolved into an address
     */
    public static void main(String[] args) throws UnknownHostException {

        SpringApplication.run(ExaminationApplication.class,args);
    }

    /**
     * 文件上传临时路径
     */
//    @Bean
//    MultipartConfigElement multipartConfigElement() {
//        MultipartConfigFactory factory = new MultipartConfigFactory();
//        factory.setLocation("/app/yunBanDan/tmp");
//        return factory.createMultipartConfig();
//    }



}

